/**
 * [448] 找到所有数组中消失的数字
 *
 * @format
 * @lc app=leetcode.cn id=448 lang=javascript
 */

// @lc code=start
/**
 * @param {number[]} nums
 * @return {number[]}
 */
var findDisappearedNumbers = function (nums) {
    const dist = {}
    const result = []
    nums.forEach((e) => (dist[e] = true))
    for (let i = 1; i <= nums.length; i++) {
        !dist[i] ? result.push(i) : null
    }
    return result
}
// @lc code=end
